<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.shengl.app.util.Translation" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>m_musicList</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
  		<h2>${success }</h2>
		<table>
            <tr>
            	<th>ID</th>
            	<th>user</th>
            	<th>语言</th>
            	<th>歌曲名称</th>
            	<th>时间</th>
            	<th>歌手</th>
            	<th>标签</th>
            	<th>备注</th>
            	<th>删除</th>
            	<th>修改</th>
            	<th>详细</th>
            </tr>
            <c:forEach items="${musics}" var="music">
                <tr>
					<td> <c:out value="${music.musicId}"/> </td>
					<td> <c:out value="${music.username}"/> </td>
                	<td> <c:set var="sl" value="${music.songLanguage}" scope="page"/>
                	<c:out value="<%=Translation.songLanguage((String)pageContext.getAttribute("sl"))%>"/> </td>
                	<td> <c:out value="${music.songName}"/> </td>
                	<td> <c:out value="${music.songTime}"/> </td>
                	<td> <c:out value="${music.singerName}"/> </td>
                	<td> <c:out value="${music.label}"/> </td>
                	<td> <c:out value="${music.note}"/> </td>
					<td> <a href="m_deleteMusic.html?musicId=${music.musicId}" onClick="{if(confirm('确定删除吗?')){return true;}return false;}"><span>删除</span></a> </td>
					<td> <a href="m_updateMusic.html?musicId=${music.musicId}"><span>修改</span></a> </td>
					<td> <a href="m_musicDetail.html?musicId=${music.musicId}"><span>详细</span></a> </td>
                </tr>
            </c:forEach>
        </table>
		<jsp:include page="../page.jsp"/>
        <h2><a href="m_updateMusic.html"><span>新增</span></a></h2>
        <h2><a href="m_index.html"><span>m_index.jsp</span></a></h2>
  </body>
</html>
